//
//  IncomeTwoViewController.m
//  NewPro
//
//  Created by RYX on 2018/10/16.
//  Copyright © 2018年 何荧红. All rights reserved.
//

#import "IncomeTwoViewController.h"
#import "NewWalletViewController.h"
#import "NewHomeViewController.h"

@interface IncomeTwoViewController ()
{
    
    __weak IBOutlet UILabel *moneyLa;
    
    __weak IBOutlet UILabel *shouxufeiLa;
    __weak IBOutlet UILabel *bandLa;
    __weak IBOutlet UILabel *shuifeiLa;
    __weak IBOutlet UILabel *shijidaozhangLa;
}
@end

@implementation IncomeTwoViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    
    [self setNavBarWithTitle:@"收益提现"];
    
    moneyLa.text = [NSString stringWithFormat:@"¥%@",self.money];
    bandLa.text = self.band;
    shouxufeiLa.text = @"2元/笔";
    shuifeiLa.text = @"6%";
    shijidaozhangLa.text = [NSString stringWithFormat:@"¥%.2f",[self.money intValue] - [self.money intValue] * 0.06 - 2];
}

- (IBAction)onOverBtn:(UIButton *)sender {
    
    UINavigationController *nav = self.navigationController;
    
    NSMutableArray *viewControllers = [[NSMutableArray alloc]init];
    
    for (UIViewController *vc in [nav viewControllers]) {
        
        [viewControllers addObject:vc];
        
        if ([vc isKindOfClass:[NewWalletViewController class]] || [vc isKindOfClass:[NewHomeViewController class]]) {
            
            break;
            
        }
        
    }
    
    [nav setViewControllers:viewControllers animated:YES];
    
}

- (void)back{
    
    UINavigationController *nav = self.navigationController;
    NSMutableArray *viewControllers = [[NSMutableArray alloc]init];
    for (UIViewController *vc in [nav viewControllers]) {
        
        [viewControllers addObject:vc];
        if ([vc isKindOfClass:[NewWalletViewController class]] || [vc isKindOfClass:[NewHomeViewController class]]) {
            
            break;
        }
    }
    
    [nav setViewControllers:viewControllers animated:YES];
    
}
@end
